import json
import os


def file_data(data):
    with open("data.txt", "a") as f:
        f.writelines(data+"\n")


class Customer:
    def __init__(self, customer_id, name, email):
        self.customer_id = customer_id
        self.name = name
        self.email = email


if __name__ == '__main__':
    customer_id = input("please enter your customer ID: ")
    name = input("please enter your name:")
    email = input("please enter your email:")
    customer_info = Customer(customer_id, name, email)
    json_data = json.dumps(customer_info.__dict__)
    file_data(json_data)
